home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 9
/
Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO
/
054a
/
stupid1.zip
/
SWT-INST.BAT
< prev
Wrap
DOS Batch File
|
1992-08-27
|
4KB
|
103 lines
@echo off
echo S T U P I D W I N D O W S T R I C K S
echo Installation Program
echo .
echo If you have not supplied a path specification for where the
echo tricks should be installed they will be installed under the
echo C:\WINDOWS directory. The installation program will soon
echo pause and ask you to strike a key to continue. If you have
echo forgotten to supply an alternative directory, or don't want
echo the tricks to be installed under C:\WINDOWS, enter Ctrl-C
echo at the next prompt. This will cause the installation program
echo to halt, and you can elect to terminate it by striking Y in
echo answer to the question "Terminate batch job? (Y/N)"
echo .
pause
REM check for default/explicit
cls
if "%1"=="" goto default
REM Parameter-supplied install follows
:explicit
echo Parameter-supplied install chosen for %1:\%2. The
echo Tricks will be installed in a family of directories under the
echo %1:\%2 directory. You may enter CTRL-C right now to terminate
echo this program.
echo .
echo .
pause
cls
echo .
echo Explicit installation requires two arguments:
echo 1. the drive letter where the target directory resides
echo Do NOT follow the drive letter with a colon (":")
echo 2. the specification for the directory under which the
echo Stupid Windows Tricks should be placed.
echo Do NOT precede the directory name with a backslash ("\")
echo .
echo To "trick" the program into moving the files under a directory
echo other than WINDOWS, you will have to create a dummy WIN.INI
echo file (because the install program looks for that file name)
echo in the target directory. You can create such a file very
echo quickly within DOS by typing the text within the quotes below
echo "COPY CON WIN.INI"
echo "TEXT"
echo "^Z"
echo The last character is a Ctrl-Z, and terminates the file entry.
echo By copying this bogus WIN.INI file to wherever it's needed,
echo you can force the install program to work. It's easier just
echo to put it under your real WINDOWS directory, though. If you
echo do create a bogus WIN.INI file, DO NOT do so in the WINDOWS
echo directory--you will *DESTROY* your real WIN.INI!!!
echo .
pause
cls
if not exist %1:\%2\win.ini goto badloc
if not exist stup-win.exe goto badloc
copy stup-win.exe %1:\%2
if not errorlevel==0 goto badloc
%1:
cd %2
stup-win.exe -d
del stup-win.exe
echo Files installed; compressed Tricks file deleted!
echo To install Tricks, start up Windows and follow instructions
echo from the book. ENJOY!!
goto done
:default
REM Default install follows
echo You have chosen the default installation. The Stupid Windows
echo Tricks will be installed in a family of directories under the
echo C:\WINDOWS directory. You may enter CTRL-C right now to
echo terminate this program.
echo .
echo .
if not exist c:\windows\win.ini goto badloc
if not exist stup-win.exe goto badloc
copy stup-win.exe c:\windows
if not errorlevel==0 goto badloc
c:
cd c:\stupid
stup-win.exe -d
del stup-win.exe
echo Files installed; compressed Tricks file deleted!
echo To install Tricks, start up Windows and follow instructions
echo from the book. ENJOY!!
goto done
:badloc
REM Handle bad location, other errors (WIN.INI not found)
echo Our install program's error checker failed! If this is not
echo because a bad directory reference was supplied, it is because
echo the install program did not find WIN.INI in this directory.
echo It needs to find this file in order to work properly; if
echo you are sure that you want the Stupid Windows Tricks to be
echo installed into the directory the program has selected, create
echo a file named WIN.INI in the target directory and the install
echo will work when you try it again.
:done